/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:47 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class BaihocEntity
    {
        public BaihocEntity()
        {
			m_pk_ibaihocid=0;
			m_stenbaihoc="";
			m_sthongtinbaihoc="";
			m_itrangthai=0;
			m_dngaytao=DateTime.Now;
			m_dngaycapnhat=DateTime.Now;
			m_fk_inguoitaoid=0;
			m_fk_inguoicapnhat=0;
        }
		private Int64 m_pk_ibaihocid;
		public Int64 PK_iBaihocID
		{
			get { return m_pk_ibaihocid ; }
			set { m_pk_ibaihocid = value; }
		}
		private String m_stenbaihoc;
		public String sTenbaihoc
		{
			get { return m_stenbaihoc ; }
			set { m_stenbaihoc = value; }
		}
		private String m_sthongtinbaihoc;
		public String sThongtinbaihoc
		{
			get { return m_sthongtinbaihoc ; }
			set { m_sthongtinbaihoc = value; }
		}
		private Int16 m_itrangthai;
		public Int16 iTrangthai
		{
			get { return m_itrangthai ; }
			set { m_itrangthai = value; }
		}
		private DateTime m_dngaytao;
		public DateTime dNgaytao
		{
			get { return m_dngaytao ; }
			set { m_dngaytao = value; }
		}
		private DateTime m_dngaycapnhat;
		public DateTime dNgaycapnhat
		{
			get { return m_dngaycapnhat ; }
			set { m_dngaycapnhat = value; }
		}
        private Int64 m_fk_ianhminhhoaid;
        public Int64 FK_iAnhminhhoaID
        {
            get { return m_fk_ianhminhhoaid; }
            set { m_fk_ianhminhhoaid = value; }
        }
		private Int64 m_fk_inguoitaoid;
		public Int64 FK_iNguoitaoID
		{
			get { return m_fk_inguoitaoid ; }
			set { m_fk_inguoitaoid = value; }
		}
		private Int64 m_fk_inguoicapnhat;
		public Int64 FK_iNguoicapnhat
		{
			get { return m_fk_inguoicapnhat ; }
			set { m_fk_inguoicapnhat = value; }
		}

        #region Comparison
        public static List<BaihocEntity> Sort(List<BaihocEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(BaihocEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<BaihocEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<BaihocEntity> COMPARISON_PK_iBaihocID
		{
			get
			{
				return delegate(BaihocEntity entity,BaihocEntity other)
				{
					return entity.PK_iBaihocID.CompareTo(other.PK_iBaihocID);
				};
			}
		}
		public static Comparison<BaihocEntity> COMPARISON_sTenbaihoc
		{
			get
			{
				return delegate(BaihocEntity entity,BaihocEntity other)
				{
					return entity.sTenbaihoc.CompareTo(other.sTenbaihoc);
				};
			}
		}
		public static Comparison<BaihocEntity> COMPARISON_sThongtinbaihoc
		{
			get
			{
				return delegate(BaihocEntity entity,BaihocEntity other)
				{
					return entity.sThongtinbaihoc.CompareTo(other.sThongtinbaihoc);
				};
			}
		}
		public static Comparison<BaihocEntity> COMPARISON_iTrangthai
		{
			get
			{
				return delegate(BaihocEntity entity,BaihocEntity other)
				{
					return entity.iTrangthai.CompareTo(other.iTrangthai);
				};
			}
		}
		public static Comparison<BaihocEntity> COMPARISON_dNgaytao
		{
			get
			{
				return delegate(BaihocEntity entity,BaihocEntity other)
				{
					return entity.dNgaytao.CompareTo(other.dNgaytao);
				};
			}
		}
		public static Comparison<BaihocEntity> COMPARISON_dNgaycapnhat
		{
			get
			{
				return delegate(BaihocEntity entity,BaihocEntity other)
				{
					return entity.dNgaycapnhat.CompareTo(other.dNgaycapnhat);
				};
			}
		}
		public static Comparison<BaihocEntity> COMPARISON_FK_iNguoitaoID
		{
			get
			{
				return delegate(BaihocEntity entity,BaihocEntity other)
				{
					return entity.FK_iNguoitaoID.CompareTo(other.FK_iNguoitaoID);
				};
			}
		}
		public static Comparison<BaihocEntity> COMPARISON_FK_iNguoicapnhat
		{
			get
			{
				return delegate(BaihocEntity entity,BaihocEntity other)
				{
					return entity.FK_iNguoicapnhat.CompareTo(other.FK_iNguoicapnhat);
				};
			}
		}
        #endregion
    }
}
